package com.big.user.api.feign;


import com.big.common.core.result.Result;
import com.big.common.feign.constants.ServiceConstants;
import com.big.user.api.domain.dto.SysUserDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * <p>
 * 用户服务远程调用客户端，提供用户相关的微服务间调用接口
 * </p>
 *
 * @author 山归岿
 * @create 2025-06-15-19:42
 */
@FeignClient(value = ServiceConstants.USER_SERVICE, path = "/user")
public interface RemoteUserFeignClient {

    /**
     * 通过实体查询
     * 为登陆状态可调用
     */
    @PostMapping("/info/getOne")
    Result<SysUserDTO> getOneDTO(@RequestBody SysUserDTO userDTO);

    /**
     * 通过传递的实体主键修改
     */
    @PutMapping("/info/update")
    Result<String> updateByIdDTO(@RequestBody SysUserDTO userDTO);
}